-
Notifications
You must be signed in to change notification settings - Fork 684
Increase branch coverage: Array.prototype functions #2796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increase branch coverage: Array.prototype functions #2796
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me in overall, after fixing the style issues.
9f7adfb
to
001e86b
Compare
I updated the patch according to your review, however I could not apply this request, because it worked differently for me and I could not find any information about how it handles empty object as 3rd argument.
|
001e86b
to
51748dd
Compare
Updated the patch and found a similar way to apply that request. |
51748dd
to
6300a92
Compare
Fixed the mentioned issues. |
Added new test cases to improve branch coverage in Array.prototype routines. The following script is made for testing branch coverage with all the test suites (--jerry-test-suite --test262 --unittests --jerry-tests), or with only one .js file. https://github.com/matedabis/jerryscript/blob/gcov_coverage_tester/tests/gcov-tests/gcovtester.py While measuring the branch coverage we dont count JERRY_ASSERT s. The results are measured by running all the test scripts, with the modifications in the PRs. Branch coverage including pando-project#2682 and pando-project#2674: -before: 399 / 476 -after: 472 / 476 There are 28 functions in ecma-builtin-array-prototype.c, we hit 14 from them. The other 14 functions are either already covered, or we could not improve the coverage of it. More information about the coverage improvement and the branches not reached: https://gist.github.com/matedabis/d7b9fc0690aa2f4be6aa160fdf482e0e While improving the coverage we found an unnecessary condition check, which can not be false in any cases. Co-authored-by: Csaba Repasi [email protected] JerryScript-DCO-1.0-Signed-off-by: Csaba Repasi [email protected] JerryScript-DCO-1.0-Signed-off-by: Mate Dabis [email protected]
6300a92
to
56651f9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (informal)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Added new test cases to improve branch coverage in Array.prototype routines.
The following script is made for testing branch coverage with all the test suites (--jerry-test-suite --test262 --unittests --jerry-tests), or with only one .js file.
https://github.com/matedabis/jerryscript/blob/gcov_coverage_tester/tests/gcov-tests/gcovtester.py
While measuring the branch coverage we dont count JERRY_ASSERT s. The results are measured by running all the test scripts, with the modifications in this PR.
Branch coverage:
-before: 399 / 476
-after: 472 / 476
There are 28 functions in ecma-builtin-array-prototype.c, we hit 14 from them.
The other 14 functions are either already covered, or we could not improve the coverage of it.
More information about the coverage improvement and the branches not reached:
https://gist.github.com/matedabis/d7b9fc0690aa2f4be6aa160fdf482e0e
While improving the coverage we found unnecessary condition checks, which can not be false in any cases.
Co-authored-by: Csaba Repasi [email protected]
JerryScript-DCO-1.0-Signed-off-by: Csaba Repasi [email protected]
JerryScript-DCO-1.0-Signed-off-by: Mate Dabis [email protected]